package com.tbvtc.agriculturalcreditchainserver2025.controller.admin;

import com.tbvtc.agriculturalcreditchainserver2025.service.MapImageService;
import com.tbvtc.agriculturalcreditchainserver2025.utils.RUtils;
import com.tbvtc.agriculturalcreditchainserver2025.utils.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@Tag(name = "地图")

public class MapImageController {
    @Autowired
    private MapImageService mapImageService;

    /**
     * 查询地图图片
     *
     * @param id
     * @return
     */
    @Operation(summary = "查询地图图片")
    @GetMapping("/mapImage")
    public Result getMapImage() {
        log.info("查询地图图片");
        List mapImage = mapImageService.getMapImage();
        return RUtils.success(mapImage);
    }
}
